<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:ice="http://www.icesoft.com/icefaces/component"
                xmlns:c="http://java.sun.com/jsp/jstl/core"
                xmlns:pptM="http://java.sun.com/jsf/composite/componentes/mensagem"
                xmlns:pptCT="http://java.sun.com/jsf/composite/componentes/tabela"
                xmlns:layout="http://java.sun.com/jsf/composite/componentes/layout"
                template="/paginas/template/Template.xhtml">

    <ui:define name="titulo">
            #{caminhaoCad.sdcTituloTelaCad}
    </ui:define>

    <ui:define name="conteudo">
        <h:head>
            <script type="text/javascript">
            </script>
            <ice:outputStyle href="#{facesContext.externalContext.requestContextPath}/css/padrao.css"/>
        </h:head>
        <pptCT:DadosTabela tabelaConfig="#{caminhaoCad.tabelaConfigPricipalCad}" bean="${caminhaoCad}" onSelectRow="rowSelectionListener" permiteNovo="true"/>
        <ice:form id="idPopupCad">
            <ice:panelPopup draggable="false" modal="true" visible="#{caminhaoCad.tabelaConfigPricipalCad.visablePopupCad}" rendered="#{caminhaoCad.tabelaConfigPricipalCad.visablePopupCad}" autoCentre="true">
                <f:facet name="body">
                    <ice:panelGrid cellpadding="0" cellspacing="0" styleClass="bodyPopupCad" headerClass="headPopupCad" footerClass="footPopupCad" columns="1">
                        <f:facet name="header">
                            <ice:panelGroup>
                                <ice:outputText value="#{caminhaoCad.sdcTituloTelaCad}"/>
                            </ice:panelGroup>
                        </f:facet>
                        <ice:panelGrid columns="4" styleClass="toolbarCad" columnClasses="nothing,nothing,width100,nothing">
                            <ice:commandButton actionListener="#{caminhaoCad.salvar}" styleClass="buttonsCad buttonSave" title="#{mLbl['botao.salvar']}"/>
                            <ice:commandButton actionListener="#{caminhaoCad.excluir}" styleClass="buttonsCad buttonExcluir" rendered="#{!caminhaoCad.tabelaConfigPricipalCad.novoReg}" title="#{mLbl['botao.excluir']}"/>
                            <ice:panelGroup/>
                            <ice:commandButton actionListener="#{caminhaoCad.cancelar}" styleClass="buttonsCad buttonCancelar" title="#{mLbl['botao.cancelar']}"/>
                        </ice:panelGrid>
                        <ice:panelGroup style="height: 10px;"/>
                        <ice:panelGrid columns="2">
                            <ice:outputText value="#{mEnt['tituloTabela.RepRodoviario']}"/>
                            <ice:selectOneMenu valueChangeListener="#{caminhaoCad.changeRepRodoviario}" partialSubmit="true" value="#{caminhaoCad.idRepRodoviarioSelected}">
                                <f:selectItems value="#{caminhaoCad.repItemsRodoviarios}"/>
                            </ice:selectOneMenu>
                            <ice:outputText value="#{mEnt['label.Caminhao.sdcModelo']}"/>
                            <ice:inputText value="#{caminhaoCad.tabelaConfigPricipalCad.selected.sdcModelo}" maxlength="20" style="width: 150px;"/>
                            <ice:outputText value="#{mEnt['label.Caminhao.nAno']}"/>
                            <ice:inputText value="#{caminhaoCad.tabelaConfigPricipalCad.selected.nAno}" maxlength="4" style="width: 40px;"/>
                            <ice:outputText value="#{mEnt['label.Caminhao.scdPlaca']}"/>
                            <ice:inputText value="#{caminhaoCad.tabelaConfigPricipalCad.selected.scdPlaca}" maxlength="10" style="width: 100px;"/>
                            <ice:outputText value="#{mEnt['label.Caminhao.snmMotorista']}"/>
                            <ice:inputText value="#{caminhaoCad.tabelaConfigPricipalCad.selected.snmMotorista}" maxlength="50" style="width: 250px;"/>
                        </ice:panelGrid>                        
                    </ice:panelGrid>
                </f:facet>
            </ice:panelPopup>
        </ice:form>
        <pptM:popupMensagem bean="${caminhaoCad}"/>
    </ui:define>
</ui:composition>
